Hi,
I've been experimenting with the various treeNodes types and the onItemClick / onClick event too. One important thing I found out is that you need a recent build of the Extension Library. I've had some strange results (as in: not working) with earlier releases.
I got the onItemClick event finally working correctly. If you set the submitValue property on every leafNode, you can check in the onItemClick event what node was clicked. Sample code below. The sample include a server side and client side event handler. Just change it the way you need it.
Mark
<xe:linksList id="linksList1">
<xe:this.treeNodes>
<xe:basicLeafNode label="Node 1 label" submitValue="node1">
</xe:basicLeafNode>
<xe:basicLeafNode label="Node 2 label" submitValue="node2">
</xe:basicLeafNode>
</xe:this.treeNodes>
<xp:eventHandler event="onItemClick" submit="true"
refreshMode="complete" execMode="partial">
<xp:this.action>
<xp:executeScript>
<xp:this.script><![CDATA[#{javascript:switch (context.getSubmittedValue() ) {
case "node1":
//code to perform when node 1 is clicked
break;
case "node2":
//code to perform when node 2 is clicked
break;
}
}]]></xp:this.script>
</xp:executeScript>
</xp:this.action>
<xp:this.script><![CDATA[alert("client side alert");]]></xp:this.script>
</xp:eventHandler>
</xe:linksList>